package com.xqboss.apps.service.synthesis;

import com.xqboss.apps.domain.synthesis.SynthesisHoldCondition;
import com.xqboss.apps.mapper.synthesis.SynthesisHoldConditionMapper;
import com.xqboss.apps.service.synthesis.SynthesisHoldConditionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.xqboss.chain.domain.chain.dto.BaseRequest;
import java.util.List;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;

/**
 * <p>
 * 持图材料配置表 服务实现类
 * </p>
 *
 * @author 木鱼
 * @since 2023-11-17
 */
@Service
@Slf4j
@RequiredArgsConstructor
public class SynthesisHoldConditionService extends ServiceImpl<SynthesisHoldConditionMapper, SynthesisHoldCondition> {
    public List<SynthesisHoldCondition> selectBasicList(BaseRequest request) {
        return baseMapper.selectList(Wrappers.<SynthesisHoldCondition>lambdaQuery());
    }

    public SynthesisHoldCondition selectByIdBasic(Long id) {
        return baseMapper.selectById(id);
    }

    public boolean saveBasic(SynthesisHoldCondition record) {
        return baseMapper.insert(record) > 0;
    }

    public boolean updateBasic(SynthesisHoldCondition record) {
        return baseMapper.updateById(record) > 0;
    }

    public boolean removeBasic(Long id) {
        return baseMapper.deleteById(id) > 0;
    }

}